objects = Sqldb.exe BatchWriter.exe
libs = ../Parser/Parser.a ../core/core.a ../FileIO/FileIO.a 
INCLUDE = ../include
CFLAGS = -O2

CC = gcc

.PHONY: all clean

all: $(objects)

$(objects): %.exe: %.o $(libs)
	$(CC) -g $(CFLAGS) $< $(libs) -o $@

%.o: %.c
	$(CC) -c -g $(CFLAGS) $< -I $(INCLUDE) -o $@ 

clean:
	rm -rf *.o
	rm -rf *.exe
